package com.hdoit.apollo.web.shop.modelconfig;

import com.hdoit.apollo.web.shop.providers.CustomerProvider;
import com.hdoit.apollo.web.shop.providers.PaymentStateProvider;
import com.hdoit.apollo.web.shop.providers.PaymentTypeProvider;
import com.hdoit.apollo.web.shop.providers.SupplierProvider;
import com.tennetcn.web.component.attribute.DisplayNameAttribute;
import com.tennetcn.web.component.attribute.DropDownListAttribute;
import com.tennetcn.web.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      tancongzhu
 * @email       
 * @createtime  2018年06月01日 10:41:32
 * @comment
 */
public class PaymentSearchConfig extends ModelMetadataAttributeConfiguration{
    public PaymentSearchConfig(){
    	
        this.setProperty("customerName")
            .hasAttribute(new DisplayNameAttribute("客户名称"));
        
        this.setProperty("customerId")
        	.hasAttribute(new DisplayNameAttribute("客户名称"))
        	.hasAttribute(new DropDownListAttribute(new CustomerProvider()));
        
        this.setProperty("supplierId")
    		.hasAttribute(new DisplayNameAttribute("供应商"))
    		.hasAttribute(new DropDownListAttribute(new SupplierProvider()));
        
        this.setProperty("projectName")
        	.hasAttribute(new DisplayNameAttribute("项目名称"));

        this.setProperty("type")
            .hasAttribute(new DisplayNameAttribute("方式"))
	    	.hasAttribute(new DropDownListAttribute(new PaymentTypeProvider()));

        this.setProperty("paymentState")
	        .hasAttribute(new DisplayNameAttribute("类型"))
	    	.hasAttribute(new DropDownListAttribute(new PaymentStateProvider()));
        
        this.setProperty("startDate")
    	.hasAttribute(new DisplayNameAttribute("开始时间"));

	    this.setProperty("endDate")
	        .hasAttribute(new DisplayNameAttribute("至"));
        
    }
}
